<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        //和var关键字用法基本一致
        // let food='西兰花炒蛋'
        // food ='西红柿炒鸡蛋'
        // console.log(food);


        //var有变量提升
        // console.log(food);  //undefined
        // var food='西兰花'

        //let 没有提升
        console.log(city);  
        let city='深圳'  //error

    </script>
</body>
</html>